﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using MyMvc.Model;
using MyMvc.BLL;
using MyMvc.Model.Models;
using MyMvc.IBLL;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Web.Security;

namespace GreenProtect
{
    public partial class notebook : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {

        }
        INoteService _noteService = new NoteService();
        protected void Button1_Click(object sender, EventArgs e)
        {
            Note note = new Note();
            note.People = this.name.Value;
            note.Phone = this.phone.Value;
            note.Topic = this.topic.Value;
            note.Mail = this.email.Value;
            if (this.RadioButtonList1.Items[1].Selected == true)
            {
                note.Position = this.RadioButtonList1.Items[1].Value;
            }
            else
            {
                note.Position = this.RadioButtonList1.Items[0].Value;
            }
            note.Website = this.website.Value;
            note.Words = this.words.Value;
            _noteService.AddEntities(note);
        }
    }
}